package com.entrogy.config;

import java.io.Serializable;

/**
 * @Author 许红松
 * @date 2019/5/20 0020 上午 10:17
 */
public class Result<T> implements Serializable {

    private int ResultCode;//返回的结果code值
    private String Message;//返回的消息
    private int  Type ;//1  成功 2失败
    private Object data;//返回的结果data

    public int getResultCode() {
        return ResultCode;
    }

    public void setResultCode(int resultCode) {
        ResultCode = resultCode;
    }

    public String getMessage() {
        return Message;
    }

    public void setMessage(String message) {
        Message = message;
    }

    public int getType() {
        return Type;
    }

    public void setType(int type) {
        Type = type;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }


    public   Result<T>  getResult(int ResultCode,String Message,int Type,Object data){
        Result result=new Result();
        result.setData(data);
        result.setMessage(Message);
        result.setResultCode(ResultCode);
        result.setType(Type);
        return  result;
    }
}
